Specifying Coupling and Cohesion Metrics using OCL and Alloy
نویسندگان
چکیده
This report presents a MOF-compliant metamodel for calculating software metrics and demonstrates how it is used to generate a metrics tool that calculates coupling and cohesion metrics. We also describe a systematic approach to the analysis of MOF-compliant metamodels and illustrate the approach using the presented metamodel. In this approach, we express the metamodel using UML and OCL and harness existing automated tools in a framework that generates a Java implementation and an Alloy specification of the metamodel, and use this both to examine the metamodel constraints, and to generate instantiations of the metamodel. Moreover, we describe how the approach can be used to generate test data for any software based on a MOF-compliant metamodel. We extend our framework to support this approach and use it to generate a test suite for the metrics calculation tool that is based on our metamodel.
منابع مشابه
A Quantitative Evaluation of Maintainability of Software Architecture Styles
Proper decisions play a crucial role in any software architecture design process. An important decision of design stage is the selection of a suitable software architecture style. Lack of investigation on the quantitative impact of architecture styles on software quality attributes is the main problem in using such styles. Consequently, the use of architecture styles in designing is based on th...
متن کاملExperiments with Coupling and Cohesion Metrics in a Large System
We apply coupling and cohesion metrics to various decompositions of a large telecommunications system. Several findings emerge: 1) There is a baseline level of coupling and cohesion that represents the average connectedness of any pair of files in the system. 2) As would be expected, measures of cohesion are greater than this baseline in well-defined subsystems. 3) Interestingly, and contrary t...
متن کاملMeasuring OCL expressions: a “tracing”-based approach
Owing that class diagrams constitute the backbone of object-oriented (OO) software development, many metrics were proposed to measure internal quality attributes such as the structural complexity, coupling, size, etc. But none of the proposed metrics take into account the added complexity when class diagrams are complemented by Object Constraint Language (OCL) expressions. OCL expressions impro...
متن کاملRe-Implementing Apache Thrift using Model-Driven Engineering Technologies: An Experience Report
In this paper we investigate how contemporary model-driven engineering technologies such as Xtext, EMF and Epsilon compare against mainstream techniques and tools (C++, flex and Bison) for the development of a complex textual modelling language and family of supporting code generators (Apache Thrift). Our preliminary results indicate that the MDE-based implementation delivers significant benefi...
متن کاملA Review on Determining Cohesion and Coupling Based Object Oriented Metrics
Object Oriented (OO) metrics play a key role in determining the efficiency of the code being developed under OO approaches. Cohesion and coupling are the widely used measures applied for the determination of important factors including reusability, maintainability and readability. There exists many Cohesion and Coupling based OO metrics making it difficult to choose the appropriate one. Moreove...
متن کامل